package com.lx.perferred.mall.admin.model;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author lX
 * @version JDK 8
 * @className UmsRole (此处以class为例)
 * @date 2024/11/30
 * @description 用户角色
 */
public class UmsRole  implements Serializable {
  private static final long serialVersionUID = 1L;

  private Long id;

  @ApiModelProperty(value = "名称")
  private String name;

  @ApiModelProperty(value = "描述")
  private String description;

  @ApiModelProperty(value = "后台用户数量")
  private Integer adminCount;

  @ApiModelProperty(value = "创建时间")
  private Date createTime;

  @ApiModelProperty(value = "启用状态：0->禁用；1->启用")
  private Integer status;

  private Integer sort;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public Integer getAdminCount() {
    return adminCount;
  }

  public void setAdminCount(Integer adminCount) {
    this.adminCount = adminCount;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public Integer getSort() {
    return sort;
  }

  public void setSort(Integer sort) {
    this.sort = sort;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    UmsRole umsRole = (UmsRole) o;
    return Objects.equals(getId(), umsRole.getId()) && Objects.equals(getName(), umsRole.getName()) && Objects.equals(getDescription(), umsRole.getDescription()) && Objects.equals(getAdminCount(), umsRole.getAdminCount()) && Objects.equals(getCreateTime(), umsRole.getCreateTime()) && Objects.equals(getStatus(), umsRole.getStatus()) && Objects.equals(getSort(), umsRole.getSort());
  }

  @Override
  public int hashCode() {
    return Objects.hash(getId(), getName(), getDescription(), getAdminCount(), getCreateTime(), getStatus(), getSort());
  }

  @Override
  public String toString() {
    return "UmsRole{" +
      "id=" + id +
      ", name='" + name + '\'' +
      ", description='" + description + '\'' +
      ", adminCount=" + adminCount +
      ", createTime=" + createTime +
      ", status=" + status +
      ", sort=" + sort +
      '}';
  }
}
